package com.code.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * 调用远程服务发送邮件
 */
@FeignClient(value = "service-email" , fallback = EmailFallback.class, path = "/email")
public interface EmailServiceFeigClient {

    @GetMapping("/{code}")
    public Map sendEmail(@PathVariable String email, @PathVariable String code);
}
